<div class="isi">
    <?php echo anchor("admin_user/tambah", "Tambah Pengguna", "class='button' style='color:#f8f8f8'") ?>

    <table id="laporan" class="display"  >
        <thead>
            <tr>
                <th width="5%">No</th>
                <th>Nama User</th>
                <th>Akses</th>
                <th width="10%">Status</th>
                <th width="10%">Tindakan</th>
            </tr>            
        </thead>
        <tbody>
            <?php
            $n = 1;
            $img_delete = $this->lib_button->delete_icon();
            $img_password = $this->lib_button->password_icon();
            $img_update = $this->lib_button->edit_icon();
            foreach ($list as $data) {
                $link_hapus = anchor('admin_user/delete/' . $data->id, $img_delete, array('onClick' => 'return confirm(\'Apa anda yakin akan menghapus data ini ?\');'));
                $link_edit = anchor('admin_user/edit/' . $data->id, $img_update);
                $link_edit_password = anchor('admin_user/edit_password/' . $data->id, $img_password);
                echo "<tr>";
                echo "<td> $n </td>";
                echo "<td> $data->nama_user </td>";
                //kalo true administrator
                if ($data->akses)
                    echo "<td align='center'> Administrator </td>";
                else
                    echo "<td align='center'> Operator </td>";

                if ($data->status)
                    echo "<td align='center'> Aktif </td>";
                else
                    echo "<td align='center'> pasif </td>";
                echo "<td> $link_edit_password $link_edit  $link_hapus </td>";
                echo "</tr>";
                $n++;
            }
            ?>
        </tbody>

    </table>   
    <div class="clear"></div>
</div>